package com.xc.sbdemo.controller;

import com.xc.sbdemo.entity.Movie;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/user")
public class UserController {

    @GetMapping("/hello")
    public String hello(Model model){
        Movie movie = new Movie();
        movie.setMovieName("黑猫警长");
        model.addAttribute("movie",movie);
        return "demo/hello";
    }
}
